package org.com.ashen.service.dao;

import org.com.ashen.dal.dataobject.SMSBalance;
import org.com.ashen.dal.mapper.SMSBalanceMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("sMSBalanceDao")
public class SMSBalanceDao {
	@Resource
    private SMSBalanceMapper sMSBalanceMapper;
	
	public int insert(SMSBalance record) {
        if (record == null) {
            return 0;
        }
        return sMSBalanceMapper.insert(record);
    }

    public int updateByPrimaryKeySelective(SMSBalance record){
        if (record == null) {
            return 0;
        }
        return sMSBalanceMapper.updateByPrimaryKeySelective(record);
    }

    public SMSBalance selectByPrimaryKey(String userid){
	    if(userid.equals("")){
	        return  null;
        }
	    return sMSBalanceMapper.selectByPrimaryKey(userid);
    }
}
